package commands.gui;

import dataTypes.DownloadFile;
import java.util.List;
import java.util.ListIterator;

/**
 * A command returning status of downloads
 * @author Marcin Kamionowski
 */
public class GUIDownloadStatusAll extends GUICommand {

    private final List<DownloadFile> files;

    /**
     * Constructor
     * @param files List of downloads
     */
    public GUIDownloadStatusAll(List<DownloadFile> files) {
        super(GUICommandType.DOWNLOADS_STATUS);
        this.files = files;
    }

    /**
     *
     * @return Iterator for list containing downloads descriptors
     */
    public ListIterator<DownloadFile> getIterator() {
        return files.listIterator();
    }

    /**
     * Getter
     * @return List of downloading files
     */
    public List<DownloadFile> getFiles() {
        return files;
    }
}
